/**
 * 
 */
package bank.factory;

import bank.account.Checking;
import bank.account.Saving;

import framework.account.IAccount;

/**
 * @author ekamoliddinov
 * 
 */
public class AccountFactory {
	public static IAccount createAccount(String type, String accountNumber) {
		if (type == "Ch")
			return new Checking(accountNumber);
		if (type == "S")
			return new Saving(accountNumber);
		throw new RuntimeException("The type is unchecked");
	}
}
